package com.neo.entity.errorMessage;

import org.apache.catalina.LifecycleState;

import java.util.List;

/**
 * Created by admin on 2017/12/15.
 */
public enum RespErrorCode {
    /*批量开户应答码列表 start*/
    APPZX_SUCCESS("APPZX000","成功"),
    APPZX_IDECRED_ERR("APPZX101","证件类型或证件编号非法"),
    APPZX_NAME_NULLERR("APPZX102","姓名字段不能为空"),
    APPZX_NAME_ERR("APPZX103","姓名字段非法"),
    APPZX_GENTER_NULLERR("APPZX104","性别字段不能为空"),
    APPZX_GENTER_ERR("APPZX105","性别字段非法"),
    APPZX_MOBLIE_ERR("APPZX106","手机号码不能为空或已被其他客户使用"),
    APPZX_MOBILE_UNABLE("APPZX107","该手机号已被使用"),
    APPZX_CUSTER_ERR("APPZX109","该客户未满18岁或重复开户"),
    APPZX_USERID_NULLERR("APPZX110","请求方用户ID不能为空"),
    APPZX_SIGN_ERR("APPZX111","未设置理财预约"),
    APPZX_SIGNINDATE_NULLERR("APPZX112","未设置约定存期"),
    APPZX_BANK_ERR113("APPZX113","银行未开通该基金公司"),
    APPZX_BANK_ERR114("APPZX114","靠档产品无法开立基金账户"),
    APPZX_BANK_ERR115("APPZX115","基金产品无法开立靠档账户"),
    APPZX_BANK_ERR116("APPZX116","靠档产品无法开立基金账户"),
    APPZX_BANK_ERR117("APPZX117","基金产品无法开立活期账户"),
    APPZX_BANK_ERR118("APPZX118","活期产品无法开立靠档账户"),
    APPZX_BANK_ERR119("APPZX119","活期产品无法开立基金账户"),
    /*批量开户应答码列表 start*/
    /*标的迁移应答码start*/
    BIDINRES_BANKNO_NULLERR("BIDINRES01","银行号不允许为空"),
    BIDINRES_BATCHNO_NULLERR("BIDINRES02","批次号不允许为空"),
    BIDINRES_PROJECTNO_NULLERR("BIDINRES03","标的编号不允许为空"),
    BIDINRES_PROJECTDESC_NULLERR("BIDINRES04","标的描述不允许为空"),
    BIDINRES_BOROWER_ACC_NULLERR("BIDINRES05","借款人电子账号不允许为空"),
    BIDINRES_INVAMT_NULLERR("BIDINRES06","借款金额不允许为空"),
    BIDINRES_INVAT_TYPEERR("BIDINRES07","借款金额不允许为非数字型"),
    BIDINRES_INVTMENT_NULLERR("BIDINRES09","项目期限不能为空"),
    BIDINRES_INVESRATE_NULLERR("BIDINRES10","预期年化收益率不允许为空"),
    BIDINRES_BANKNO_ERRFILE("BIDINRES11","银行号与文件名不一致"),
    BIDINRES_FILEBATCH_ERR("BIDINRES12","文件名批次号与文件体不符"),
    BIDINRES_INVACC_ERR("BIDINRES13","借款人账户不存在"),
    BIDINRES_INVBANK_ERR("BIDINRES14,","借款人账户所属银行错误"),
    BIDINRES_INVACC_ERRSTATUS("BIDINRES15","借款人账户状态不正常"),
    BIDINRES_INVMOBILE_NOTFIND("BIDINRES19","未找到借款人卡号对应手机号记录"),
    BIDINRES_ASSCOUNT_ERROR("BIDINRES20","第三方平台验证不通过"),
    BIDINRES_NOCUSTORMESSAGE("BIDINRES21","未找到借款人账户客户信息"),
    BIDINRES_EXITPROJECTNO("BIDINRES22","标的信息已存在，不允许重复录入"),
    BIDINRES_INTTYPE_ERR("BIDINRES23","付息方式不合法"),
    BIDINRES_INTPAYDAY_CANNOTNULL("BIDINRES24","利息每月支付日必送"),
    BIDINRES_CUSTORINBLACK("BIDINRES25","黑名单客户无法录入标的信息"),
    BIDINRES_CARDNBRNOCARD("BIDINRES26","担保人卡片不存在"),
    BIDINRES_CARDNBR_BANKERR("BIDINRES27","担保人卡片不属于该发卡行"),
    BIDINRES_CARDNBR_CUSTOR_ERR("BIDINRES28","担保人卡片跟借款人卡片非同产品"),
    BIDINRES_CARDNBR_NOMESSAGE("BIDINRES29","未找到此担保人卡号对应的账户记录"),
    BIDINRES_CARDNBR_KILL("BIDINRES30","担保人账户已销户"),
    BIDINRES_CARDNBR_NOTFINDMESSAGE("BIDINRES31","未找到担保人的客户信息"),
    BIDINRES_CARDNBR_NOCARD("BIDINRES32","名义借款人卡片不存在"),
    BIDINRES33("BIDINRES33","名义借款人卡片不属于该发卡行"),
    BIDINRES34("BIDINRES34","名义借款人卡片跟借款人卡片非同产品"),
    BIDINRES35("BIDINRES35","未找到名义借款人卡号对应的账户记录"),
    BIDINRES36("BIDINRES36","名义借款人账户已销户"),
    BIDINRES37("BIDINRES37","未找到名义借款人的客户记录"),
    BIDINRES38("BIDINRES38","未找到名义借款人卡片对应记录"),
    BIDINRES39("BIDINRES39","平台账户不能进行标的录入"),
    BIDINRES41("BIDINRES41","收款人卡片不存在"),
    BIDINRES45("BIDINRES45","受托支付标志非法"),
    BIDINRES46("BIDINRES46","多种借款人模式下收款人电子账号必送"),
    BIDINRES47("BIDINRES47","未找到此担保人卡号对应的账户记录"),
    BIDINRES48("BIDINRES48","多种借款人标识非法"),
    BIDINRES49("BIDINRES49","未找到担保人卡片对应记录"),
    BIDINRES50("BIDINRES50","收款人卡片不属于该发卡行"),
    BIDINRES51("BIDINRES51","收款人卡片跟借款人卡片非同产品"),
    BIDINRES52("BIDINRES52","未找到收款人卡号对应的账户记录"),
    BIDINRES53("BIDINRES53","收款人账户已销户"),
    BIDINRES54("BIDINRES54","未找到收款人的客户记录"),
    BIDINRES55("BIDINRES55","未找到收款人卡片对应记录"),
    /*标的迁移应答码end*/

    /*签约关系迁移应答码start*/
    SIGRES_SUCCESS("SIGRES00","签约成功"),
    SIGRES_BANK_NULLERR("SIGRES01","银行号为空"),
    SIGRES_BATCHNO_NULLERR("SIGRES02","批次号为空"),
    SIGRES_ACCOUNTID_NULLERR("SIGRES03","电子账户为空"),
    SIGRES_FUISSUER_NULLERR("SIGRES04","理财产品发行方为空"),
    SIGRES_SIGTYPE_NULLERR("SIGRES05","签约类型为空"),
    SIGRES_SIGTYPE_ERR("SIGRES06","签约类型值非1或2"),
    SIGRES_SIGORDERID_NULLERR("SIGRES07","签约流水号为空"),
    SIGRES_SIGDAY_NULLERR("SIGRES08","签约日期为空"),
    SIGRES_SIGTIME_NULLERR("SIGRES09","签约时间为空"),
    SIGRES10("SIGRES10","存在未取消的签约记录"),
    SIGRES11("SIGRES11","签约流水号已存在"),
    SIGRES12("SIGRES12","卡号不存在"),
    SIGRES13("SIGRES13","卡片不属于该发卡行"),
    SIGRES14("SIGRES14","卡片未激活"),
    SIGRES15("SIGRES15","卡片未申领或制卡"),
    SIGRES16("SIGRES16","未找到电子账户的客户记录"),
   /* 签约关系迁移应答码end*/
   /*批量发红包应答码start*/
    TRQTRES10("TRQTRES10","平台电子账号异常"),
    TRQTRES20("TRQTRES20","转入方电子账户交易权限校验失败"),
    TRQTRES21("TRQTRES21","转入方电子账户帐号异常"),
    TRQTRES35("TRQTRES35","转出方余额不足"),
    TRQTRES36("TRQTRES36","转入方余额不足"),
    TRQTRES70("TRQTRES70","文件内银行号与文件名不一致"),
    TRQTRES72("TRQTRES72","文件内批次号与文件名不一致"),
    TRQTRES73("TRQTRES73","币种不等能为空"),
    TRQTRES74("TRQTRES74","金额不能为空"),
    TRQTRES81("TRQTRES81","姓名校验失败"),
    TRQTRES85("TRQTRES85","平台账户不存在"),
    TRQTRES93("TRQTRES93","姓名不能为空"),
    TRQTRES94("TRQTRES94","其他错误");
    /*批量发红包应答码end*/






    private String dispValue;
    private String disCode;

    RespErrorCode(String disCode, String dispValue) {
        this.disCode = disCode;
        this.dispValue = dispValue;
    }

    public String getDispValue() {
        return dispValue;
    }

    public String getDisCode() {
        return disCode;
    }

    public static String getName(String disCode) {
        for (RespErrorCode c : RespErrorCode.values()) {
            if (c.disCode .equals(disCode) ) {
                return c.getDispValue() ;
            }
        }
        return null;
    }
}
